{assign var=ok value="<img src='themes/default/images/ok.png' />"}
{assign var=error value="<img src='themes/default/images/error.png' />"}
{assign var=warning value="<img src='themes/default/images/warning.png' />"}

<h1>{'Installation_System_check'|translate}</h1>


<table class="infosServer">
	<tr>
		<td class="label">PHP {'Installation_version'|translate} &gt; {$infos.phpVersion_minimum}</td>
		<td>{if $infos.phpVersion_ok}{$ok}{else}{$error}{/if}</td>
	</tr><tr>
		<td class="label">Pdo {'Installation_extension'|translate}</td>
		<td>{if $infos.pdo_ok}{$ok}
		{else}{$error}{/if}	
		</td>
	</tr>  
	<tr>
		<td class="label">Pdo_Mysql {'Installation_extension'|translate}</td>
		<td>{if $infos.pdo_mysql_ok}{$ok}
		{else}{$error}
		{/if}
		
		{if !$infos.pdo_mysql_ok || !$infos.pdo_ok}
			<p class="error" style="width:80%">${'Installation_pdo'|translate}
			<small>
			<br><br>{'Installation_winphpini_pre'|translate}
			<code>extension=php_pdo.dll
				extension=php_pdo_mysql.dll</code> ${'Installation_winphpini_post'|translate}
			
			<br><br>{'Installation_linphpini_pre'|translate}
			<code>--with-pdo-mysql </code> 
			
			<br><br>{'Installation_moreinfo'|translate} <a style="color:red" href='http://php.net/pdo'>PHP {'Installation_website'|translate}</a>.
			</small>
			</p>
		{/if}
		
		</td>
	</tr>
	
	{* We don't use utf8_encode currently but I think we will soon so I leave the code here
	<tr>
		<td class="label">PHP-XML {'Installation_extension'|translate} <br> (utf8_decode {'Installation_function'|translate})</td>
	    <td>{if $infos.phpXml_ok}{$ok}{else}{$error}{/if}</td>
	</tr>
	*}
	<tr>
		<td valign="top">
			{'Installation_writable_dirs'|translate}
		</td>
		<td>
			{foreach from=$infos.directories key=dir item=bool}
				{if $bool}{$ok}{else}
				<span style="color:red">{$error}</span>{/if} 
				{$dir}
				<br>				
			{/foreach}
		</td>
	</tr>
</table>

{if $problemWithSomeDirectories}
	<br>
	<div class="error">
		{'Installation_dirmod'|translate}
	{foreach from=$infos.directories key=dir item=bool}
		<ul>{if !$bool}
			<li>chmod a+w {$basePath}{$dir}</li>
		{/if}
		</ul>
	{/foreach}
	</div>
	<br>
{/if}
<h1>{'Installation_Optional'|translate}</h1>
<table class="infos">
	<tr>
		<td class="label">{'Installation_Memory_limit'|translate}</td>
		<td>
			{$infos.memoryCurrent}
			{if $infos.memory_ok}{$ok}{else}{$warning} 
				<br><i>${'Installation_RaiseLimit1'|translate}
				<br>${'Installation_RaiseLimit2'|translate} memory_limit ${'Installation_RaiseLimit3'|translate}</i>{/if}	
		</td>
	</tr>
	<tr>
		<td class="label">GD &gt; 2.x ({'Installation_graphics'|translate})</td>
		<td>
			{if $infos.gd_ok}{$ok}{else}{$warning} <br><i>{'Installation_sparkline'|translate}</i>{/if}
		</td>
	</tr>
	<tr>
		<td class="label">set_time_limit() {'Installation_allowed'|translate}</td>
		<td>{if $infos.setTimeLimit_ok}{$ok}{else}{$warning}
			<br><i>${'Installation_RaiseLimit1'|translate}
				<br>${'Installation_RaiseLimit2'|translate} max_execution_time ${'Installation_RaiseLimit3'|translate}</i>{/if}</td>
	</tr>
	<tr>
		<td class="label">mail() {'Installation_allowed'|translate}</td>
		<td>{if $infos.mail_ok}{$ok}{else}{$warning}{/if}</td>
	</tr>
</table>
<p><small>
Legend:
<br>
{$ok} {'Installation_Ok'|translate}<br>
{$error} {'Installation_Error'|translate}<br>
{$warning} {'Installation_Warning'|translate}<br>
</small></p>

{if !$showNextStep}
<p class="nextStep">
	<a href="{url}">{'Installation_Refresh'|translate} &raquo;</a>
</p>

{/if}
